1. Field of the Invention
The present invention relates to event processing in a distributed system in which a plurality of computers connected via a network operate in a coordinated manner, and more particularly to a method and apparatus for determining dynamic flow by means of an action chain which enables flexible chaining of actions. The present invention is applicable to distributed-object-oriented platforms such as CORBA, DCOM, and Java RMI.
2. Description of the Related Art
An event processing model plays an important role in the development of a distributed processing system. When an interface between objects linked to one another is designed by use of an event processing model which is based on a proper rule, local behaviors can be grasped even if the distributed processing system becomes large in scale and complex.
A general event processing model used in conventional distributed systems will be described. An object which sends an event is called an “event source,” and an object which receives the event and performs some processing is called an “event listener.”
FIG. 15 shows an example of a class definition used in a conventional event processing model; and FIG. 16 shows an example sequence of conventional event processing. An object (Source object) serving as an event source has an interface (addEventListener( ) in this example) through which at least event listeners are registered from the outside. An object (Listener object) serving as an event listener has an action method (action( ) in this example) which is executed upon generation of an event.
First, the reference pointer of the event listener is registered in the event source (Source object) by means of the interface (addEventListener()). In response to a state change (status changed), the event source calls a predetermined action method by use of the registered reference pointer of the event listener. In this manner, processing linked to the generation of an event can be performed on the distributed system.
This model has a drawback in that since processing which is executed upon generation of an event is defined as a method of the event listener, the behavior of the event listener cannot be changed during execution of the event processing system. Another drawback is that whether each object is to behave as an event source or to behave as an event listener is determined at the time of designing the object, and its role cannot be changed during execution of event processing.